package com.bwie.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.*;

/**
 * @author 牛毅
 * @version 1.0
 * @date 2025/7/21
 * @description TODO
 */
@Configuration
public class Mypool {

    @Bean
    public ThreadPoolExecutor  threadPoolExecutor(){
        ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(14, 28,
                0L, TimeUnit.MILLISECONDS,
                new LinkedBlockingQueue<Runnable>(),
                Executors.defaultThreadFactory()
        );
        return threadPoolExecutor;
    }

}
